package yto.freemarker.springcloud.service;

import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import yto.freemarker.springcloud.configuration.UserServiceConfiguration;
import yto.freemarker.springcloud.entity.User;

/**
 * @author dongxing
 * @create 2018-03-01 21:09
 **/
@FeignClient(name = "service-provider", configuration = UserServiceConfiguration.class)
public interface UserService {

    @RequestLine("GET /user/{id}")
    public User getUserById(@Param("id") Integer id);

    @RequestLine("POST /user/post/1")
    public User postUser(@RequestBody User user);


}
